package innerclasses.controller;
import java.time.*;
public abstract class Event {
	private Instant eventTime;
	protected final Duration delayTime;
	public Event(long millisecendDelay) {
		delayTime = Duration.ofMillis(millisecendDelay);
		start();
	}
	
	public void start() {
		eventTime = Instant.now().plus(delayTime);
	}
	public boolean ready() {
		return Instant.now().isAfter(eventTime);
	}
	public abstract void action();
}
